package com.study.sbsummary.config.constant;

/**
 * 文档操作类型
 */
public enum DocOperateTypeEnum {
    DOC_OPERATE_TYPE_NORMAL(1, "常规"),
    DOC_OPERATE_TYPE_DELETE(2, "删除"),
    DOC_OPERATE_TYPE_RECOVERY(3, "恢复"),
    DOC_OPERATE_TYPE_HIDE(4, "隐藏"),
    DOC_OPERATE_TYPE_HIDE_RECOVERY(5, "隐藏恢复"),
    DOC_OPERATE_TYPE_COMPUTE_REVIEW_REJECT(6, "机审未通过删除"),
    DOC_OPERATE_TYPE_HUMAN_REVIEW_REJECT(7, "人审未通过删除"),
    DOC_OPERATE_TYPE_OPERATOR_DELETE(8, "运营删除"),
    DOC_OPERATE_TYPE_USER_DELETE(9, "用户删除"),
    DOC_OPERATE_TYPE_OPERATOR_RECOVERY(10, "运营恢复"),
    DOC_OPERATE_TYPE_BANNED_DELETE(11, "封号删除"),
    DOC_OPERATE_TYPE_LOGOFF_DELETE(12, "注销删除"),
    DOC_OPERATE_TYPE_SYSTEM_RECOVERY(13, "系统恢复"),
    ;

    private final Integer code;
    private final String describe;

    DocOperateTypeEnum(Integer code, String message) {
        this.code = code;
        this.describe = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getDescribe() {
        return describe;
    }

    public static DocOperateTypeEnum docOperateTypeByCode(Integer code) {
        for (DocOperateTypeEnum docOperateTypeEnum : values()) {
            if (docOperateTypeEnum.code == code) {
                return docOperateTypeEnum;
            }
        }
        return DOC_OPERATE_TYPE_NORMAL;
    }

}
